﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testFading.aspx.cs" Inherits="testFading" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type = "text/javascript" language = "javascript" >
        function onLoad(){
            var img = document.getElementById("test");
            img.onclick = click;
        }
        
        function click(){
           setInterval("fad()", 1);
            //var img = document.getElementById("test");
           // alter();
            //img.style.filter = "alpha(opacity = 0)";
        }
        var value = 100;
        function fad(){
            var img = document.getElementById("test");
            value -= 20;
            if(value == 0)
            {
                return;
            } else
            {
                img.style.filter = "alpha(opacity = " + value + ")";
            }
        }
    </script>
</head>
<body onload = "onLoad();">
    <form id="form1" runat="server">
    <div>
        <img alt = "test" id = "test" src ="test.png" onclick = "click();" width = "600" height = "500"/> 
        <br />
        <input id ="btn" type = "button" value = "click here" />
    </div>
    </form>
</body>
</html>
